<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<input id="wd" placeholder="请您输入英文" />
		<input type="button" value="查询" onclick="chaDanCi()"/>
		<script>
			var chineses=["猪","狗","猫"];
			var englishs=["pig","dog","cat"];
			var chaDanCi=function(){
				var word = wd.value;
				var isFind = false;
				for(var i=0;i<englishs.length;i++){
					if (englishs[i]==word){
						alert(chineses[i]);
						isFind = true;
					}
				}
			};
		</script>
		
	</body>
</html>
